/**
 * Created by THINK on 2017/8/17.
 */

//判断是否是图片
function isPicture(picStr) {
    if (picStr.length >= 5){
        var newPicStr = picStr.substring(picStr.length-4);
        if (newPicStr == ".jpg"){
            return true;
        }else if (newPicStr == ".png"){
            return true;
        }else if (newPicStr == ".jpge"){
            return true;
        }else {
            return false;
        }
    }else {
        return false;
    }
}

//判断字符串中是否存在某个字符串
function isContainsString(str, subStr) {
    return new RegExp(substr).test(str);
}